Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WalletConnectURI public #53

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

hewigovens
Copy link
Contributor

We need to pass around WalletConnectURI before paring and typed uri is always safer than string, also it might better to have a public func pair(uri: WalletConnectURI) method in WalletConnectClient

@hewigovens
Copy link
Contributor Author

hewigovens commented Jan 25, 2022

Add code sample for better understanding this issue:

public enum WCVersionedSession: Equatable {
     case v1(WCSession)
     case v2(WalletConnectURI)

     public static func from(string: String) -> WCVersionedSession? {
         if let session = WCSession.from(string: string) {
             return .v1(session)
         } else if let uri = WalletConnectURI(string: string) {
             return .v2(uri)
         }
         return nil
     }
 }

@hewigovens
Copy link
Contributor Author

@MisterVants @llbartekll please check the sample code above

@llbartekll llbartekll merged commit aa2c087 into WalletConnect:develop Jan 26, 2022
@hewigovens hewigovens deleted the h/public-uri branch January 26, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants